﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace TKT.Lifter.CIM.Lifter.TibcoMsg.Lifter
{
    public class TraceListReply : MessageBody
    {
        public string MachineName { get; set; }
        public string UnitName { get; set; }
        public string TIAACK { get; set; }
        public string TRID { get; set; }
        public string TOTSMP { get; set; }

        public TraceListReply()
            : base("TraceListReply")
        { }

        public override System.Xml.Linq.XElement ToXElement()
        {
            XElement body = new XElement("Body");
            body.Add(new XElement("MACHINENAME", this.MachineName));
            body.Add(new XElement("UNITNAME", this.UnitName));
            body.Add(new XElement("TIAACK", this.TIAACK));
            body.Add(new XElement("TRID", this.TRID));
            body.Add(new XElement("TOTSMP", this.TOTSMP));
            return body;
        }

        public override void Parse(System.Xml.Linq.XElement body)
        {
            this.MachineName = body.Element("MACHINENAME").Value;
            this.UnitName = body.Element("UNITNAME").Value;
            this.TIAACK = body.Element("TIAACK").Value;
            this.TRID = body.Element("TRID").Value;
            this.TOTSMP = body.Element("TOTSMP").Value;
        }
    }
}
